/* eslint-disable */
/* eslint-disable */
import Vue from 'vue'

import Cookies from 'js-cookie'

import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import Element from 'element-ui'
import vueBeauty from 'vue-beauty'
import 'element-ui/lib/theme-chalk/index.css'

// import '@/styles/index.scss' // global css
// import '@/styles/element.scss'
// import '@/styles/reset.css'
// import '@/styles/common.css'
// import 'vue-beauty/package/style/vue-beauty.min.css'

import App from './App'
import router from './router'
import store from './store'

import i18n from './lang'
import './mock'

import * as filters from './filters'

import VueClipboard from 'vue-clipboard2'

import '@/permission' // permission control

Vue.use(Element, vueBeauty, {
  size: Cookies.get('size') || 'small',
  i18n: (key, value) => i18n.t(key, value)
})

Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

Vue.config.productionTip = false

Vue.use(VueClipboard)

new Vue({
  el: '#app',
  router,
  store,
  i18n,
  render: h => h(App),
  data: {
    eventBus: new Vue()
  }
})
